
<form class="form" autocomplete="off" novalidate
      #myForm="ngForm"
      [class.submitted]="myForm._submitted"
      (ngSubmit)="save(myForm)">

    <div class="item">
        <label class="required">代理名称</label>
        <input type="text" name="name"
               [(ngModel)]="fm.name"
               required />
    </div>

    <div class="item">
        <label class="required">公司名称</label>
        <input type="text" name="companyName"
               [(ngModel)]="fm.companyName"
               required />
    </div>

    <div class="item">
        <label>余额</label>
        <input type="text" name="totalBalance" [(ngModel)]="fm.totalBalance" />
    </div>

    <div class="item">
        <label>可授权信用额度</label>
        <input type="text" name="creditPerTenant" [(ngModel)]="fm.creditPerTenant" />
    </div>

    <div class="actions">
        <button type="submit" class="btn blue">保存</button>
        <button class="btn white" type="button" [routerLink]="['../']">取消</button>
    </div>

</form>